package cn.flexui.flexuiserver.service.impl;

import cn.flexui.flexuiserver.domain.constant.MemberConts;
import cn.flexui.flexuiserver.domain.entity.MemberCard;
import cn.flexui.flexuiserver.mapper.MemberCardMapper;
import cn.flexui.flexuiserver.service.MemberCardService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 会员卡 服务实现类
 * </p>
 *
 * @author apeto
 * @since 2024-09-22 10:50:52
 */
@Service
public class MemberCardServiceImpl extends ServiceImpl<MemberCardMapper, MemberCard> implements MemberCardService {

    @Override
    public List<MemberCard> selectByViewTypeAndType() {
        LambdaQueryWrapper<MemberCard> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(MemberCard::getCardState, MemberConts.MemberStateEnum.ONLINE.getState());
        return list(queryWrapper);
    }

}
